package com.bsoft.gol.hcs.common.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "fus_diagnosis_info", catalog = "")
public class FusDiagnosisInfo {
    private long infoId;
    private long medicalRecordsId;
    private String diagnosisId;
    private String diagnosisName;
    private String diagnosisIcd10;
    private Byte diagnosisType;
    private Date gmtCreate;
    private Date gmtModified;

    @Id
    @Column(name = "info_id")
    public long getInfoId() {
        return infoId;
    }

    public void setInfoId(long infoId) {
        this.infoId = infoId;
    }

    @Basic
    @Column(name = "medical_records_id")
    public long getMedicalRecordsId() {
        return medicalRecordsId;
    }

    public void setMedicalRecordsId(long medicalRecordsId) {
        this.medicalRecordsId = medicalRecordsId;
    }

    @Basic
    @Column(name = "diagnosis_id")
    public String getDiagnosisId() {
        return diagnosisId;
    }

    public void setDiagnosisId(String diagnosisId) {
        this.diagnosisId = diagnosisId;
    }

    @Basic
    @Column(name = "diagnosis_name")
    public String getDiagnosisName() {
        return diagnosisName;
    }

    public void setDiagnosisName(String diagnosisName) {
        this.diagnosisName = diagnosisName;
    }

    @Basic
    @Column(name = "diagnosis_icd10")
    public String getDiagnosisIcd10() {
        return diagnosisIcd10;
    }

    public void setDiagnosisIcd10(String diagnosisIcd10) {
        this.diagnosisIcd10 = diagnosisIcd10;
    }

    @Basic
    @Column(name = "diagnosis_type")
    public Byte getDiagnosisType() {
        return diagnosisType;
    }

    public void setDiagnosisType(Byte diagnosisType) {
        this.diagnosisType = diagnosisType;
    }

    @Basic
    @Column(name = "gmt_create")
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Basic
    @Column(name = "gmt_modified")
    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FusDiagnosisInfo that = (FusDiagnosisInfo) o;
        return infoId == that.infoId &&
                medicalRecordsId == that.medicalRecordsId &&
                Objects.equals(diagnosisId, that.diagnosisId) &&
                Objects.equals(diagnosisName, that.diagnosisName) &&
                Objects.equals(diagnosisIcd10, that.diagnosisIcd10) &&
                Objects.equals(diagnosisType, that.diagnosisType) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(infoId, medicalRecordsId, diagnosisId, diagnosisName, diagnosisIcd10, diagnosisType, gmtCreate, gmtModified);
    }
}
